package com.woniuxy.service.impl;

import com.woniuxy.dao.UserDao1;
import com.woniuxy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao1 userDao;

    @Override
    public List<Map<String, String>> findAll() {
        Map<String, String> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("account","test");
        userDao.insert(objectObjectHashMap);
        return userDao.findAll();

    }

    @Override
    public void updateOne() {
        Map<Object,Object> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("account","updateName");
        objectObjectHashMap.put("id",21);
        userDao.updateOne(objectObjectHashMap);
    }
}
